#pragma once

#include<memory>
#include "Core.h"
#include "spdlog/spdlog.h"

namespace Sven
{
    class SV_API Log
    {
    public:
        static void Init();
        inline static std::shared_ptr<spdlog::logger>& GetCoreLogger() { return s_CoreLogger; }
        inline static std::shared_ptr<spdlog::logger>& GetClientLogger() { return s_ClientLogger; }

    private:
        static std::shared_ptr<spdlog::logger> s_CoreLogger;
        static std::shared_ptr<spdlog::logger> s_ClientLogger;

    };
}

//Core Log macros
#define SV_CORE_ERROR(...)  ::Sven::Log::GetCoreLogger()->error(__VA_ARGS__)
#define SV_CORE_WARN(...)   ::Sven::Log::GetCoreLogger()->warn(__VA_ARGS__)
#define SV_CORE_INFO(...)   ::Sven::Log::GetCoreLogger()->info(__VA_ARGS__)
#define SV_CORE_TRACE(...)  ::Sven::Log::GetCoreLogger()->trace(__VA_ARGS__)
#define SV_CORE_FATAL(...)  ::Sven::Log::GetCoreLogger()->fatal(__VA_ARGS__)

//Client Log 
#define SV_ERROR(...)  ::Sven::Log::GetClientLogger()->error(__VA_ARGS__)
#define SV_WARN(...)   ::Sven::Log::GetClientLogger()->warn(__VA_ARGS__)
#define SV_INFO(...)   ::Sven::Log::GetClientLogger()->info(__VA_ARGS__)
#define SV_TRACE(...)  ::Sven::Log::GetClientLogger()->trace(__VA_ARGS__)
#define SV_FATAL(...)  ::Sven::Log::GetClientLogger()->fatal(__VA_ARGS__)
